#pragma once

#include "Snowflake.hpp"

// Permission flags, thanks to Discord API reference
#define PERM_CREATE_INSTANT_INVITE 0x0000000000000001
#define PERM_KICK_MEMBERS 0x0000000000000002
#define PERM_BAN_MEMBERS 0x0000000000000004
#define PERM_ADMINISTRATOR 0x0000000000000008
#define PERM_MANAGE_CHANNELS 0x0000000000000010
#define PERM_MANAGE_GUILD 0x0000000000000020 
#define PERM_ADD_REACTIONS 0x0000000000000040  
#define PERM_VIEW_AUDIT_LOG 0x0000000000000080 
#define PERM_PRIORITY_SPEAKER 0x0000000000000100
#define PERM_STREAM 0x0000000000000200         
#define PERM_VIEW_CHANNEL 0x0000000000000400   
#define PERM_SEND_MESSAGES 0x0000000000000800
#define PERM_SEND_TTS_MESSAGES 0x0000000000001000 
#define PERM_MANAGE_MESSAGES 0x0000000000002000 
#define PERM_EMBED_LINKS 0x0000000000004000
#define PERM_ATTACH_FILES 0x0000000000008000 
#define PERM_READ_MESSAGE_HISTORY 0x0000000000010000 
#define PERM_MENTION_EVERYONE 0x0000000000020000 
#define PERM_USE_EXTERNAL_EMOJIS 0x0000000000040000
#define PERM_VIEW_GUILD_INSIGHTS 0x0000000000080000
#define PERM_CONNECT 0x0000000000100000
#define PERM_SPEAK 0x0000000000200000
#define PERM_MUTE_MEMBERS 0x0000000000400000
#define PERM_DEAFEN_MEMBERS 0x0000000000800000
#define PERM_MOVE_MEMBERS 0x0000000001000000
#define PERM_USE_VAD 0x0000000002000000
#define PERM_CHANGE_NICKNAME 0x0000000004000000
#define PERM_MANAGE_NICKNAMES 0x0000000008000000
#define PERM_MANAGE_ROLES 0x0000000010000000
#define PERM_MANAGE_WEBHOOKS 0x0000000020000000
#define PERM_MANAGE_GUILD_EXPRESSIONS 0x0000000040000000
#define PERM_USE_APPLICATION_COMMANDS 0x0000000080000000
#define PERM_REQUEST_TO_SPEAK 0x0000000100000000 
#define PERM_MANAGE_EVENTS 0x0000000200000000
#define PERM_MANAGE_THREADS 0x0000000400000000 
#define PERM_CREATE_PUBLIC_THREADS 0x0000000800000000
#define PERM_CREATE_PRIVATE_THREADS 0x0000001000000000
#define PERM_USE_EXTERNAL_STICKERS 0x0000002000000000
#define PERM_SEND_MESSAGES_IN_THREADS 0x0000004000000000
#define PERM_USE_EMBEDDED_ACTIVITIES 0x0000008000000000
#define PERM_MODERATE_MEMBERS 0x0000010000000000
#define PERM_VIEW_CREATOR_MONETIZATION_ANALYTICS 0x0000020000000000
#define PERM_USE_SOUNDBOARD 0x0000040000000000
#define PERM_CREATE_GUILD_EXPRESSIONS 0x0000080000000000
#define PERM_CREATE_EVENTS 0x0000100000000000
#define PERM_USE_EXTERNAL_SOUNDS 0x0000200000000000
#define PERM_SEND_VOICE_MESSAGES 0x0000400000000000

#define PERM_ALL 0x00007FFFFFFFFFFF

struct Overwrite
{
	uint64_t m_allow = 0;
	uint64_t m_deny = 0;
	Snowflake m_affected = 0; // Note. If this is the ID of the guild, everyone is affected.
	bool m_bIsMember = false;
};
